1. Field of the Invention
The present invention relates to an apparatus such as an optical encoder for optical measurement of a displacement of a moving body.
2. Description of the Prior Art
FIG. 1 shows a prior art optical encoder for measuring a position or an angle, wherein reference numeral 301 denotes a light source, reference numeral 302 denotes a rotary plate comprising an A/B phase signal region, wherein slits or a grating 306 of equal pitch are arranged on a circumference and a Z phase signal region, wherein only one slit 307 is provided on a circumference. Reference numeral 303 denotes a fixed plate having an A/B phase signal region, wherein slits or a grating 308 of the same pitch as that of the slits or a grating 306 of the rotary plate are arranged, and a Z phase signal region, wherein only one slit 309 is provided on a circumference. Reference numeral 304 denotes a photosensor for detecting light transmitted through the rotary plate 302 and the fixed plate 303. By detecting light transmitted through the A/B phase signal regions of the rotary plate and the fixed plate, a signal (A/B phase signal) in accordance with an angle of the rotary plate is detected, while by detecting light transmitted through the Z phase signal regions, a signal (Z phase signal) indicating an origin reference point of the rotary plate can be detected.
However, in the above-mentioned prior art method, there is a problem in that the degree of modulation of the A/B phase signal is deteriorated. This problem is explained below. FIG. 2 shows a basic structure of a prior art optical encoder used for measuring a position or angle of a moving body (see Japanese Laid-open Patent Publication 257419/1991). In FIG. 2, reference numeral 11 denotes a light source including a laser diode or a light-emitting diode of a relatively high coherence, reference numeral 12 denotes a collimator lens for collimating light emitted from the light source 11; reference numeral 13 denotes a fixed diffraction plate having a grating having a cross-section with a section of a rectangular-wave-like shape and arranged perpendicular to an optical axis of the collimated light emitted from the lens 12; reference numeral 14 denotes a movable diffraction plate having a cross-section of a rectangular-wave-like shape and arranged perpendicular to the optical axis, the movable diffraction plate being able to move perpendicularly (or up and down in the drawing). The gratings of the fixed and rotary diffraction plates have the same period each other.
Further, a step difference "d" of the height between the tops and bottoms of the fixed and movable diffraction plates 13 and 14 has the following relationship to the wavelength .lambda. of the light source 11: EQU .vertline.n-n.sub.0 .vertline..times.d=(.lambda./2).times.(1+2m)(1)
wherein m=0, .+-.1, .+-.2, . . . ; n denotes an index of refraction of the material of the fixed and rotary diffraction plates 13 and 14 and n.sub.0 denotes an index of refraction of the medium between the plates 13 and 14. Furthermore, in FIG. 2, reference numeral 105 denotes a condenser lens for condensing light transmitted through the movable diffraction plate 14, while reference numeral 16 denotes a photosensor which converts a diffracted image condensed by the lens 105 into an electrical signal. The movable diffraction plate 14 is fixed, for example, to a revolving rotator, while the fixed diffraction plate 13 is held in a stationary state. The amount of rotation of the rotator can be obtained by deriving the amount of displacement of the movable diffraction plate 14 with respect to the fixed diffraction plate 13 from an output signal of the photosensor 16.
The operation of the prior art optical encoder having a structure as described above is as follows. First, light emitted from an optical source 11 is collimated by the collimator lens 12. Then, the light enters the fixed diffraction plate generally perpendicularly. The difference "d" of the height between the tops and bottoms of the fixed diffraction plate 13 is formed to have the relationship of Eq. (1) as described above. In this case, it is known that the components of diffracted light of even numbered orders including zero are equal to and that most of the energy is concentrated in diffracted light of orders .+-.1 (about 40% for each). Thus, the light entering the fixed diffraction plate 13 is diffracted by the plate 13 and goes out as diffracted light 110 of order .+-.1 and light 111 of order -1. The diffracted light 110 and 111 enter the movable diffraction plate 14 and exit as diffracted light 120 and 121. As with to the light diffracted by the fixed diffraction plate 13, the diffracted light of the movable diffraction plate 14 has zero components of diffracted light of even numbered orders including zero, and most of the energy is concentrated in diffracted light of orders .+-.1 (about 40% for each).
The diffracted light exiting from the movable diffraction plate 14 is expressed as (n, m), wherein n denotes an order of diffraction of the fixed diffraction plate 13, and m denotes an order of diffraction of the movable diffraction plate 14. Then, diffracted light transmitted through the movable diffraction plate 14 in parallel to the optical axis thereof includes diffracted light 121 of (+1, -1), diffracted light 122 of (-1, +1), diffracted light of (-3, +3), diffracted light of (+3, -3) and so on. However, diffracted light of orders of 3 or more have been omitted from FIG. 2 for simplicity. When the movable diffraction plate 14 is moved at a constant speed perpendicular to the optical axis, the phase of diffracted light of orders more than 3 changes relative to that of order 0. It is known that an optical intensity of light obtained by interference of diffracted light (+k, -k) with that of light (-k, +k) has a sine wave of a frequency of k/p (or a frequency of k times a basic frequency 1/k) wherein p denotes a array pitch of the grating formed in the movable diffraction plate 14. Therefore, the diffracted light of (+1, -1) and (-1, +1) which compose a main part of the total light energy interferes each other, and an output sine wave is obtained having a frequency of two times the basic frequency of the fixed and movable diffraction plates 13 and 14. Therefore, the prior art makes it possible to detect a position precisely by using the components of the doubled frequency.
However, the prior art has a problem in that the degree of modulation is deteriorated. The diffracted light of (+1, -1) and (-1, +1) are all condensed by the condenser lens 105 in order to use light efficiently as described above. Then, a minimum optical intensity detected by the photosensor 16 does not become zero or the degree of modulation is deteriorated.
This is explained with reference to FIG. 3, wherein .lambda. denotes the wavelength of the light source 11; D denotes the beam size; p denotes the grating pitch of the fixed and movable diffraction plates 13 and 14 and reference numeral 105 denotes a Fourier transform lens of a focal length f. Furthermore, .DELTA.x denotes the amount of displacement of the movable diffraction plate 14; .alpha. denotes a diffraction angle .lambda./p of diffracted light of order 1. Because .alpha. is sufficiently small, sin .alpha.=tan .alpha.=.alpha.. A shape of a cross-section of the gratings of the fixed and movable diffraction plates 13 and 14 is expressed for simplicity by a complex amplitude as: EQU cos (k.alpha.x)={exp(ik.alpha.x)+exp(-ik.alpha.x)}/2,
and the diffracted light of orders .+-.1 is approximated by a collimated light. Then, a complex amplitude of diffracted light of order +1 on the movable diffraction plate 14 is expressed as A.phi.exp(-ik.alpha.x), while that of order -1 is expressed as A.phi.exp(+ik.alpha.x), wherein .phi.=exp(-ikg cos .alpha.) and A denotes an amplitude of an incident beam. A complex amplitude f1 of the diffracted light of order +1 on the movable diffraction plate 14 is expressed as follows: ##EQU1## Similarly, a complex amplitude f2 of the diffracted light of order +1 on the movable diffraction plate 14 is expressed as follows: ##EQU2## Then, a divergence of the diffracted light of order+1 on the movable diffraction plate 14 becomes (-D/2-g.alpha., D/2-g.alpha.). Therefore, if Eq. (2) is Fourier-transformed in the range, the following Eq. (4) is obtained, wherein .omega.=2.pi.x/(f.lambda.). ##EQU3##
Similarly, because a divergence of the diffracted light of -order 1 on the movable diffraction plate 14 becomes (-D/2+g.alpha., D/2+gV.alpha.), if Eq. (3) is Fourier-transformed in the range, the following Eq. (5) is obtained. Therefore, a complex amplitude detected by the photosensor 16 is expressed by Eq. (6). ##EQU4## In Eq. (6), the first term relates to diffracted light of (+1, -1) and (-1, +1), and the second term relates to diffracted light of (+1, +1) and the third item relates to diffracted light of (-1, -1).
Next, an effect around the optical axis of the second and third terms is explained. In Eq. (6), if .omega.=.DELTA.x=0, the amplitude of the first term becomes AX. On the other hand, the amplitudes of the second and third terms become: EQU A.vertline.sin(k.alpha.D).vertline./(2k.alpha.).ltoreq.A/(2k.alpha.)=Ap/(4. pi.).
If D=0.5 mm and p=10 .mu.m, (the second term/the first term) and (the third term/the first term) are 0.0016 or less. Therefore, the second and third terms are sufficiently small and are negligible around the optical axis, and only the first term is detected by the photosensor 16. Then, only the first term in Eq. (6) is considered below.
FIG. 4 shows an amplitude distribution at the photosensor 14 when an amount of displacement .DELTA.x of the movable diffraction plate 14 is zero or the output intensity is at a maximum. It is found in FIG. 4 that the amplitude is at a maximum on the optical axis. In the calculation, it is assumed that .lambda.=633 nm, g=2 mm, f=5 mm, p=10 .mu.m and D=0.5 mm. On the other hand, FIG. 5 shows an amplitude distribution when the intensity is at a minimum (k.alpha..DELTA.x=.pi./2 or .DELTA.x=p/4), wherein the amplitude is normalized with respect to the maximum amplitude in FIG. 4. In this case, the first term in Eq. (6) becomes Eq. (7): ##EQU5##
FIG. 5 and Eq. (7) shows that light exists outside the optical axis. If such light exists, the degree of modulation has been deteriorated. FIG. 6 shows the degree of modulation when the above-mentioned values are used and the size of the photosensor 5 is 50 .mu.m. The degree of modulation is defined as (output intensity-minimum intensity)/(maximum intensity-minimum intensity).
In order to avoid such an effect, a pin hole or the like may be provided to shade light outside the optical axis. However, if the beam size including the main portion of the light in FIG. 5 is as small as 12 .mu.m, then it is necessary to make the pin hole as small as a few .mu.m smaller than the beam size. However, in this case, light is also detected and the degree of modulation is deteriorated. Further, the position adjustment of the pin hole relative to the optical axis is difficult. Still furthermore, if such a small pin hole is used, a loss in the amount of light is large and an electrical signal obtained by the photosensor is weak and is liable to be affected by noise.
Next, another problem of prior art methods is explained. If a geometrical center of the rotary plate deviates from a rotation center thereof, errors of the A/B phase signals are accumulated. This problem is explained by using the model shown in FIG. 7, wherein reference numeral 51 denotes a light source; reference numeral 52 denotes a collimator lens for collimating light emitted by the light source, reference numeral 53 denotes a rotary plate having slits of equal pitches on a circumference; reference numeral 54 denotes a fixed plate having slits of pitches which are the same as those of the rotary plate and reference numeral 55 denotes a photosensor for detecting light transmitted through the rotary plate 53 and the fixed plate 54.
When the rotary plate 53 is rotated, the positions of the slit openings of the rotary plate 53 relative to those of the fixed plate 54 change so that the amount of light received by the photosensor 55 changes according the change in the relative relationship of the positions. FIGS. 8A and 8B show a change of output signal of the photosensor 55 in this case. If the slit pitch is wide enough not to cause diffraction, the output signal changes as shown in FIG. 8A. If the slit pitch is small with respect to the distance between the rotary plate 53 and the fixed plate 54, a waveform of an output signal of the photosensor 55 is affected by the diffraction at the slits and corners of the waveform become rounded to change it into a waveform which approximates a sinewave as shown in FIG. 8B.
Eq. (8) shows the output of the photosensor 55 when the signal waveform is approximated as a sinewave. EQU y=A sin(N.theta.)+B (8)
wherein A denotes a signal amplitude, B denotes a DC component of the signal, and N denotes the number of the slits formed in the rotary plate 43 and .THETA. denotes a rotary angle.
The accumulated errors noted above which are caused by the eccentricity of the rotary plate 53 is explained with reference to FIG. 9 which illustrates a beam irradiation position and beam trajectory on the rotary plate 53. If a eccentricity amount e exists between a rotation center 60 and a center 61 of the rotary plate 53, a rotation angle of a particular point 62 or an angle .THETA. relative to the rotation center 60 is different from an angle .THETA..sub.a relative to the center 61 of the rotary plate 53. If r denotes a distance between the rotation angle 60 and the photosensor 55, .delta.=.THETA.-.THETA..sub.a =(.epsilon./r)cos .THETA.. Because the output signal of the photosensor 55 depends on the angle .THETA..sub.a on the center of the rotary plate 61, the output signal is expressed as shown in Eq. (9). EQU y=A sin(N.theta..sub.a)+B EQU =A sin{N(.theta.+(.epsilon./r)cos .theta.)}+B (9)
When a rotation angle is changed from 0 to .THETA., the number of pulses of the photosensor 55 is expressed as follows: EQU N(.theta.+(.epsilon./r)cos .theta.)/(2.pi.) (10)
Then, when a rotation angle is changed from .alpha. to .beta., the number of pulses of the photosensor 55 is expressed as follows: EQU N(.beta.-.alpha.+(.epsilon./r)(cos .beta.-cos .alpha.))/(2.pi.)(11)
Thus, a difference of the number of the pulses relative to a true pulse number N(.beta.-.alpha.), or an accumulated error of the signals is expressed as follows: EQU N(.epsilon./r)(cos .beta.-cos .alpha.)/(2.pi.) EQU ={N.epsilon./(.pi.r)}sin{(.beta.+.alpha.)/2}sin{(.beta.-.alpha.)/2}(12)
A maximum accumulated error occurs when .alpha.=0 and .beta.=.pi., and it amounts to N.epsilon./(.pi.r) pulses. For example, if the number of pulses is 10,000 pulses per rotation, the position r of the photosensor from the rotation center is 20 mm and the eccentricity amount .epsilon. is 10 .mu.m, the accumulated errors amount to 1.6 pulses. This is too large for an encoder of 10,000 pulses, and the encoder cannot be used practically.
The accumulated errors can be decreased if r is increased or the eccentricity amount .epsilon. is decreased. However, in order to decrease the accumulated errors down to 0.1 pulse or lower, r has to be larger than 320 mm, and the size of the encoder becomes vary large. If the eccentricity amount .epsilon. is decreased, it has to be decreased to less than 0.6 .mu.m, and this makes the setup of the rotary plate 53 very difficult.
Therefore, in a prior art method, in order to realize an encoder having a high resolution, two photosensors are arranged at two symmetrical points with reference to the rotation center of the rotary plate 53, and an arithmetic average of the optical intensities detected by the photosensors is used to prevent the accumulated errors. The principle of this method is explained below.
When the eccentricity of the rotary plate occurs, the outputs of the two photosensors are expressed as Eqs. (13) and (14) by using Eq. (9). EQU y1=A1 sin{N(.theta.+(.epsilon./r) cos .theta.)}+B1 (13) EQU y2=A2 sin{N(.theta.-.pi.+(.epsilon./r) cos (.theta.-.pi.))}+B2(14) EQU =A2 sin{N(.theta.-(.epsilon./r) cos .theta.)}+B2
If it is assumed for simplicity that A1=A2=A and B1=B2=B, an arithmetic average of the two outputs is obtained as shown in Eq. (15). EQU y=y1+y2 EQU =2A sin (N.theta.) cos{(N.epsilon./r) cos .theta.}+2B (15)
Eq. (15) shows that the errors are not accumulated error because the effect of eccentricity vanishes in the term on the period of pulse signals.
However, Eq. (15) shows clearly that an amplitude of the obtained signal is multiplied by cos{(N.epsilon./r)cos .theta.}, and this means that the signal amplitude varies with the rotation angle if an eccentricity .epsilon. exists. When .vertline.N.epsilon./r.vertline.&gt;.pi., there exists a portion wherein the signal amplitude becomes zero in a rotation of the rotary plate. Therefore, in order to use it for an encoder, then it is necessary by .vertline.N.epsilon./r.vertline.&lt;.pi.. For example, if N=10,000 and r=20 mm, .epsilon. must be 6.3 .mu.m or less. Then, in order to produce a compact encoder having a high resolution, the rotary plate has to be set up very precisely, and this increases its cost. Furthermore, because the eccentricity or the axis due to a load has to be decreased too, the axis becomes large to increase its weight, and the conditions for the encoder to be used are limited.
A further problem of a prior art method, explained below, is that the precision of the position detection of the origin of the encoder is deteriorated according to a change of the intensity of the light source. It is known to detect a position of a body without contact. For example, as disclosed in Japanese Laid-open Patent Publication 44,202/1990, a body is illuminated with a light to project its image onto a video camera, and a position is detected by digitizing the output signal of a linear array sensor. Further, in order to detect a reference position of a moving body, a slit is provided in the moving body and the body is illuminated with a light. A light transmitted through the slit is received by photosensors and the output signals thereof are digitized.
An example of the prior art position detection is explained with reference to FIGS. 10 and 11A and 11B. FIG. 10 is a plan view of a prior art position detection apparatus, wherein reference numeral 251 denotes a light source and reference numeral 252 denotes a moving body. A slit 253 is provided in the moving body 252. Reference numeral 254 denotes a photosensor. The moving body 252 exists between the light source 251 and the photosensor 254, and it moves perpendicularly to an axis between the light source 251 and the photosensor 254.
An operation of the apparatus is explained below. FIG. 11A illustrates a light beam 255, passing the slit 253 in the moving body 252, and the photosensor 254. The moving body is assumed to move along an x-axis from left to right. Therefore, the light beam 255 scans the photosensor 254 according to the movement of the moving body 252. Then, the output signal of the photosensor 254 has a waveform as shown in FIG. 11B. In order to prevent influence of scattered light or the like entering the photosensor 254, a suitable threshold value is set to digitize the output. Thus, a reference position signal of the moving body can be obtained.
However, the following problem exists: When the intensity of a light emitted by the light source fluctuates, an influence similar to the fluctuation of the threshold level occurs and the pulse width of the reference position signal and the position of the signal edges are changed. Therefore, the precision of the position detection is deteriorated. Further, as the beam size on the photosensor 254 is decreased, a change in the output signal of the photosensor 254 with respect to a change of the moving body 252 becomes large. Therefore, the deterioration of the precision of position detection due to noise from scattered light and electrical noise decreases. However, if the size of the slit 253 is decreased too much in order to decrease the beam size, diffraction occurs and the beam size on the photosensor 254 increases. Further, if the slit size is decreased, the amount of light received by the photosensor 254 decreases and errors due to noise increase. A gap between the slit 253 and the photosensor 254 may be decreased in order to avoid the effects of diffraction. However, if the gap is decreased, there is a possibility that the moving body makes contact with the photosensor so as to cause damage. Further, in order to generate a pulse of a narrow prescribed width, the width of the photosensor 254 and the beam size have to be decreased. However, the above-mentioned problems of the contact between the moving body 252 and the photosensor 254 and the deterioration of the precision of the position detection due to noise occur also in this case.